<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入样式 -->
    <!-- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> -->
    <!-- 引入组件库 -->
    <!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
    <link rel="stylesheet" href="../element-ui/index.css">
    <script src="../js/vue.js"></script>
    <script src="../element-ui/index.js"></script>
    <style>
        *{padding: 0;margin: 0;}
        .row {
            margin-top: 10px;
        }
        .col{
            line-height: 40px;
            background-color: grey;
        }
    </style>
</head>

<body>
    <div id="app">
        <el-row>
            <el-checkbox v-model="checked"></el-checkbox>
            <el-checkbox v-model="checked" disabled>备选项</el-checkbox>
        </el-row>
        <el-row>
            <el-checkbox v-model="val" :true-label="1" :false-label="0" @change="changeHandler">{{val}}</el-checkbox>
        </el-row>
        <el-row>
            <el-checkbox-group v-model="checkList">
                <el-checkbox label="唱歌"></el-checkbox>
                <el-checkbox label="跳舞"></el-checkbox>
                <el-checkbox label="rap"></el-checkbox>
                <el-checkbox label="篮球" disabled></el-checkbox>
              </el-checkbox-group>
            <p>
                checkList:{{checkList}}
            </p>
        </el-row>
    </div>
</body>
<script>

    var app = new Vue({
        el: "#app",
        data: {
            checked: true,
            val:1,
            checkList:[],
        },
        methods: {
            changeHandler(bool){
                console.log("change了",bool);
            }
        },
    })



</script>

</html>